<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!--<body>-->

<!--</body>-->
<!--</html>-->

<!--<style>-->
    <!--.input-group{-->
        <!--margin-top: 45px;-->
    <!--}-->

<!--</style>-->
<script>
    function addqu() {
        var url = $("#urlchoose").val()
        alert(url);
        $.ajax({
            type:"POST",
            url: url,
            datatype: "json",
            data: $("#form1").serialize(),
            success: function (result) {
                if (result.res==0) showconfiginfo(this);
                    // alert("插入成功")
                else {
                    alert("插入失败请重试")
                }
            },
            error:function () {
            }
        })
    }

</script>


<form class="form-horizontal" id="form1" onsubmit="return false">
    <div class="form-group" style="margin-top: 50px" >
        <div class="col-xs-offset-1 col-xs-2">
            <select class="form-control" id="urlchoose">
                <option>请选择题型</option>
                <option value="addqt">java单选试题修改</option>
                <option value="addqw">web单选试题修改</option>
            </select>
        </div>
    </div>
    <div class=" col-xs-offset-3 col-xs-6" style="margin-top: 50px">
        <div class="form-group input-group">
            <span class="input-group-addon" id="qtype-addon">题目类型</span>
            <input aria-describedby="qtype-addon" class="form-control" type="text" placeholder="请输入题目类型" name="qtype">
        </div>
        <div class="form-group input-group">
            <span class="input-group-addon" id="que-addon">题目</span>
            <input aria-describedby="que-addon" class="form-control" type="text" placeholder="请输入题目" name="topic">
        </div>
        <div class="input-group form-group">
            <span class="input-group-addon" id="ans1-addon">选项一：</span>
            <input aria-describedby="ans1-addon" class="form-control" type="text" placeholder="请输入选项一" name="answer1">
        </div>
        <div class="input-group form-group">
            <span class="input-group-addon" id="ans2-addon">选项二：</span>
            <input aria-describedby="ans2-addon" class="form-control" type="text" placeholder="请输入选项二" name="answer2">
        </div>
        <div class="input-group form-group">
            <span class="input-group-addon" id="ans3-addon">选项三：</span>
            <input aria-describedby="ans3-addon" class="form-control" type="text" placeholder="请输入选项三" name="answer3">
        </div>
        <div class="input-group form-group">
            <span class="input-group-addon" id="ans4-addon">选项四：</span>
            <input aria-describedby="ans4-addon" class="form-control" type="text" placeholder="请输入选项四" name="answer4">
        </div>
        <div class="form-group">
            <div class=" col-xs-2">
                <select class="form-control" name="rightAnswer">
                    <option>答案</option>
                    <!--<option>&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</option>-->
                    <option value="A">-- A --</option>
                    <option value="B">-- B --</option>
                    <option value="C">-- C --</option>
                    <option value="D">-- D --</option>
                </select>
            </div>

            <button class="btn col-xs-offset-8 col-xs-2" onclick="addqu()">确认</button>
        </div>


    </div>
</form>